import { createApp } from 'vue'
import ElementPlus from 'element-plus';
import "element-plus/theme-chalk/index.css"
import * as Elicons from '@element-plus/icons-vue'
import router from './router'
import "./globle/css/index.less"
import { setupElementPlus } from './globle/ts/plugins/element-plus'
import './utils/mock'
import vuex from './store/index'
import App from './App.vue'
import './router/permission'
import filters from './utils/filter'
import * as echarts from 'echarts'

import VueBMap, { initBMapApiLoader } from 'vue-bmap-gl'
import 'vue-bmap-gl/dist/style.css'



const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.use(vuex)
app.use(VueBMap)
app.mount('#app')
app.config.globalProperties.$echarts = echarts

filters(app)
setupElementPlus(app)

for (const [key, component] of Object.entries(Elicons)) {
    app.component(key, component)
}

initBMapApiLoader({
    ak: 'qRklLgLjLfmDSrPCQDzQV431KyRx2XAY'
})

